import java.util.Scanner;
public class homeWork {
    public static void Compare(int x,int y){
        if(x>y){
            System.out.println(x);
        }
        System.out.println(y);
    }
    public static void Compare(double x,double y){
        if(x>y){
            System.out.println(x);
        }
        System.out.println(y);
    }
    public static void Compare(double x, double y,int z) {
        if (x > z && x > y) {
            System.out.println(x);
        } else if (y > z && y > x) {
            System.out.println(y);
        } else if (z > x&&z > y){
            System.out.println(z);
        }
    }

    public static int fib(int n){
        if(n==0){
            return 0;
        }else if(n==1){
            return 1;
        }else {
            return fib(n-1)+fib(n-2);
        }
    }

    public static int Sum(int n){
        if(n<=9){
            return n;
        }
        return n%10+Sum(n/10);
    }

    public static void print(int a){
        if(a<=9) {
            System.out.println(a);
            return;
        }

        print(a/10);
        System.out.println(a%10);
    }

    public static int sum(int a){
        if(a==1){
            return 1;
        }
        int tmp=a+sum(a-1);
        return tmp;
    }

    public static int ret(int n){
        if(n==1){
            return 1;
        }
        return n*ret(n-1);
    }
    public static void main6(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        System.out.println(ret(n));
    }
    public static void main5(String[] args) {
        System.out.println(sum(3));
    }
    public static void main4(String[] args) {
        print(1234);
    }
    public static void main3(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        System.out.println(Sum(n));
    }
    public static void main2(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        System.out.println(fib(n));
    }
    public static void main1(String[] args) {
        Compare(2,3);
        Compare(1.5,2.5);
        Compare(1.5,2.5,3);
    }


    public static int avg(int[] a){
        for (:
             ) {
            
        }
    }
    public static void main(String[] args) {
        int []arr={1,2,3,4,5};
        avg(arr);
    }





























}


